package com.csap.framework.apidoc.admin.web;

import com.csap.framework.annotation.apidoc.ApiOperation;
import com.csap.framework.annotation.apidoc.ApiProperty;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import com.csap.framework.annotation.apidoc.Description;
import org.springframework.web.bind.annotation.RestController;
import com.csap.framework.apidoc.admin.model.ApiDocPathModel;
import com.csap.framework.annotation.ResponseAdvice;
import com.csap.framework.apidoc.admin.entity.ApiDocPathEntity;
import com.csap.framework.annotation.apidoc.Api;
import com.csap.mybatisplus.extension.service.web.BaseController;
import com.csap.framework.apidoc.admin.service.ApiDocPathService;

import javax.validation.constraints.NotNull;

/**
 * <p>
 * 文档路径信息
 * </p>
 *
 * @author
 * @dateTime
 */
@RequestMapping(value = "/api/apiDocPath")
@ResponseAdvice
@Api(description = "文档路径信息", value = "文档路径信息")
@RestController
@Description(value = "文档路径信息Controller")
public class ApiDocPathController extends BaseController<ApiDocPathService, ApiDocPathEntity, ApiDocPathModel, Long> {


    @ApiOperation(value = "刷新单个文档")
    @ApiProperty(value = "路径ID", name = "id", required = true)
    @PutMapping("flushDoc")
    public Boolean flushDoc(@NotNull(message = "路径ID未传") Long id) {
        return getService().flushDoc(id);
    }
}
